package com.nhjf.admin.controller.total;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.nhjf.admin.controller.BaseController;
import com.nhjf.common.page.Pagination;
import com.nhjf.pojo.qo.total.CourseCountQo;
import com.nhjf.pojo.qo.total.UserCountQo;
import com.nhjf.service.teachers.CoursesService;
import com.nhjf.service.total.CourseCountService;



@Controller
@RequestMapping(value = "/courseCount")
public class CourseCountController extends BaseController{
	
	@Autowired
	private CourseCountService courseCountService;
	
	
	/**
     * 
     * @方法功能说明：课程统计
     * @修改者名字：龚一凡
     * @修改内容：
     * @参数：
     * @return:
     * @throws
     */
	@RequestMapping(value = "/queryCourseCount")
	public String queryRoleList(HttpServletRequest request, Model model,@ModelAttribute CourseCountQo courseCountQo,@RequestParam(value="page", defaultValue="1")Integer page){
	
		if (courseCountQo == null) {
			courseCountQo = new CourseCountQo();
		}
		Pagination pagination = new Pagination();
		pagination.setPageSize(10);
		pagination.setCondition(courseCountQo);
		pagination.setPageNo(page);
		pagination = courseCountService.queryPagination(pagination);
		model.addAttribute("pagination", pagination);
		model.addAttribute("courseCountQo", courseCountQo);
		return "/total/courseCount_list.html";
	}

}
